<cfsetting enablecfoutputonly="true" /> 
<!--- @@displayname: Podcast listing --->
<!--- @@author: Jeff Coughlin (jeff [at] jeffcoughlin [dot] com) --->

<!------------------ 
FARCRY IMPORT FILES
 ------------------>
<cfimport taglib="/farcry/core/tags/webskin" prefix="skin" />

<cfset recordsPerPage = 10 />
<cfset numberOfPageLinks = 5 />

<cfset qEpisodes = getEpisodes(bActive = true,orderBy = 'publishDate desc, label asc') />

<cfif qEpisodes.recordCount gt 0>
  <cfif qEpisodes.recordCount gt recordsPerPage>
    <skin:pagination qRecordSet="#qEpisodes#" recordsPerPage="#recordsPerPage#" pageLinks="#numberOfPageLinks#" paginationid="" r_stObject="stCurrentRow">
      <skin:view typename="jcPodcastEpisode" objectid="#stCurrentRow.objectId#" webskin="displayTeaserStandard" />
    </skin:pagination>
  <cfelse>
    <cfloop query="qEpisodes">
      <skin:view typename="jcPodcastEpisode" objectid="#qEpisodes.objectId#" webskin="displayTeaserStandard" />
    </cfloop>
  </cfif>
</cfif>

<cfsetting enablecfoutputonly="false" />